import { createApp } from 'vue'
import App from '@/App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// @ts-expect-error
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' //引入国际化
//暗黑模式需要的样式
import 'element-plus/theme-chalk/dark/css-vars.css'
//svg插件需要配置代码
import 'virtual:svg-icons-register'
import gloablComponent from './components/index'
import './styles/index.scss' //为项目添加一些全局的样式
import router from '@/router/index' //注册路由
import pinia from '@/store/index'
import './permisstion'
const app = createApp(App)
app.use(gloablComponent)
app.use(pinia)
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(router)
//引入自定义指令文件
import { isHasButton } from '@/directive/has'
isHasButton(app)
app.mount('#app')
